<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>


<jsp:include page="/jsp/layout/cabecalho.jsp" flush="true"/>
<jsp:include page="/jsp/layout/menu.jsp" flush="true"/>
<div id="box_principal">
		<div id="box_top">&nbsp;</div>
		<div id="box_titulo">
		<font class="titulo">
		<b>
		<fmt:message key="campo.cadusuario"/>
		</b>
		</font>
		</div>
		<div id="box_form">
			<form id="fCadastrar" action="../CadastrosServlet?action=1" method="post">
				<jsp:useBean id="user" class="com.sdc.bean.UsuarioBean" scope="request" />
				<jsp:useBean id="usuario" class="com.sdc.bean.UsuarioBean" scope="session"/>
				<table width="600" border="0" align="center" cellpadding="0" cellspacing="5">
					<c:choose>
						<c:when test="${usuario.id_tipo_usuario == 3}">
							<tr>
								<td align="right">

								</td>
								<td style="font-weight: bold;">
									<input style="border: 0px;"	type="radio" name="intTipo" id="intTipo" value="2">
									<fmt:message key="campo.tipousuario.adm"/>
									<input style="border: 0px;" type="radio" name="intTipo" id="intTipo" value="1">
									<fmt:message key="campo.tipousuario.cli"/>
								</td>
							</tr>
						</c:when>
					</c:choose>
					<tr>
						<td nowrap align="right">
						<fmt:message key="campo.nomecompleto"/>
						</td>
						<td colspan="3">
							<input name="strNome" id="strNome" type="text" style="width: 338px;" maxlength="60" VALUE="${user.nome}">*
						</td>
					</tr>
					<tr>
						<td nowrap align="right">
						<fmt:message key="campo.cpf"/>
						</td>
						<td colspan="3">
							<input name="strCpf" id="strCpf" type="text" style="width: 120px;" maxlength="14" VALUE="${user.cpf}" />*
						</td>
					</tr>
					<tr>
						<td nowrap align="right">
						<fmt:message key="campo.nascimento"/>
						</td>
						<td colspan="3">
							<input name="strDtNascimento" id="strDtNascimento" type="text" style="width: 100px;" maxlength="10" VALUE="${user.dt_nasc}">*
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.sexo"/>
						</td>
						<td style="font-weight: bold;">
							<input style="border: 0px;"	type="radio" name="strSexo" id="strSexo" value="M">
							<fmt:message key="campo.masculino"/>
							<input style="border: 0px;" type="radio" name="strSexo" id="strSexo" value="F">
							<fmt:message key="campo.feminino"/>
						</td>
					</tr>

					<tr>
						<td align="right">
						<fmt:message key="campo.endereco"/>
						</td>
						<td>
							<input name="strEndereco" type="text" style="width: 338px;" maxlength="59" VALUE="${user.endereco}"> &nbsp;N&ordm;:
							<input name="strNumero" type="text" style="width: 60px;" maxlength="6" VALUE="${user.numero}">
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.bairro"/>
						</td>
						<td>
							<input name="strBairro" type="text" style="width: 200px;" maxlength="30" VALUE="${user.bairro}">
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.cidade"/>
						</td>
						<td>
							<input name="strCidade" type="text" style="width: 200px;" maxlength="30" VALUE="${user.cidade}">
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.estado"/>
						</td>
						<td>
							<select name="strUf" class="textompeq">
								<option value="" selected>
								<fmt:message key="campo.selecione"/>
								</option>
								<option value="AC">Acre</option>
								<option value="AL">Alagoas</option>
								<option value="AP">Amap&aacute;</option>
								<option value="AM">Amazonas</option>
								<option value="BA">Bahia</option>
								<option value="CE">Cear&aacute;</option>
								<option value="DF">Distrito Federal</option>
								<option value="ES">Espirito Santo</option>
								<option value="GO">Goi&aacute;s</option>
								<option value="MA">Maranhao</option>
								<option value="MT">Mato Grosso</option>
								<option value="MS">Mato Grosso do Sul</option>
								<option value="MG">Minas Gerais</option>
								<option value="PB">Paraiba</option>
								<option value="PR">Paran&aacute;</option>
								<option value="PA">Par&aacute;</option>
								<option value="PE">Pernambuco</option>
								<option value="PI">Piaui</option>
								<option value="RN">Rio Grande do Norte</option>
								<option value="RS">Rio Grande do Sul</option>
								<option value="RJ">Rio de Janeiro</option>
								<option value="RO">Rondonia</option>
								<option value="RR">Roraima</option>
								<option value="SC">Santa Catarina</option>
								<option value="SP">Sao Paulo</option>
								<option value="SE">Sergipe</option>
								<option value="TO">Tocantins</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.email"/>
						</td>
						<td>
							<input name="strEmail" type="text" style="width: 338px;" maxlength="59" VALUE="${user.email}">
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.usuario"/>
						</td>
						<td>
							<input name="strUsuario" id="strUsuario" type="text" style="width: 150px;" maxlength="12" VALUE="${user.usuario}">*
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.senha"/>
						</td>
						<td>
							<input name="strSenha" id="strSenhaCadastro" type="password" style="width: 150px;" maxlength="12" VALUE="${user.senha}">*
						</td>
					</tr>
					<tr>
						<td align="right">
						<fmt:message key="campo.confirmacaosenha"/>
						</td>
						<td>
							<input name="strConfSenha" id="strConfSenha" type="password" style="width: 150px;" maxlength="12">*
						</td>
					</tr>

				</table>

				<table border="0" cellpadding="2" align="center" cellspacing="5">
					<tr>
						*<fmt:message key="campo.obrigatorio"/>
					</tr>
					<tr>
						<td>
							<input id="bt_cadastrar_usuario" src="/SDC/images/bt_confirmar.gif" type="image" />
						</td>
						<td>
							<img name="bt_cancelar" src="/SDC/images/bt_cancelar.gif" onclick="history.go(-1);" />
						</td>
					</tr>

				</table>
			</form>
		</div>
		<div id="box_bottom">&nbsp;</div>
</div>

<jsp:include page="/jsp/layout/rodape.jsp" flush="true"/>
